package homework_04;

import java.util.Arrays;

/**
 * 数组逆序
 */
public class Test_04 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        int[] arr1 = arrTurn(arr);
        System.out.println(Arrays.toString(arr1));
    }

    public static int[] arrTurn(int[] arr){
        int m = 0;
        int[] arrTmp = new int[arr.length];
        for(int i=0;i<arr.length;i++){
            arrTmp[i] = arr[arr.length-1 - i];
        }
        return arrTmp;
    }
}
